Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

TZInfo::Timezones with no transitions fail on export

#13

Certain time zones have not transitions and therefore no local start time. The following spec for TZInfoTimezone tests that all TZInfo timezone identifiers can be used, and (except for "UTC") will generate a VTIMEZONE component with at least one period.

TZInfo::Timezone.all_identifiers.each do |tz|

context "TZInfo timezone #{tz}" do
  before(:each) do
    @calendar = RiCal.Calendar do |cal|
      cal.event do |event|
        event.description = "test"
        event.dtstart = "TZID=#{tz}:20090530T123000"
        event.dtend =   "TZID=#{tz}:20090530T123001"
      end
    end
  end
  it "should be allowed as a tzid" do
    lambda {@calendar.export}.should_not raise_error
  end
  unless tz == "UTC"
    it "should produce at least one period in the VTIMEZONE" do
      @calendar.export.should match(/BEGIN:(STANDARD|DAYLIGHT)/)
    end
  end
end

end

Reported by Rick DeNatale · June 14th, 2009 @ 07:39 PM

State: resolved
Milestone: none
Assigned to: Rick DeNatale Rick DeNatale

Activity

  1. Rick DeNatale
    Rick DeNatale
    • State changed from new to resolved

    Fixed in 0.6.3

    June 14th, 2009 @ 09:50 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.